As the complexity of computer programs continues to increase, the benefits of software development tools are amplified. The interactions among operations within a computer program are not apparent to a developer during execution of the program. Typically, when a program stops crashing during testing, it is assumed that the program will run as expected. However, the level of confidence is typically not high, since a program cannot be tested in all possible environments in which the program may be run. For example, conflicts may occur as a result of the loading of two unrelated programs onto a computer system.
One available software development tool is referred to as a compiler. A compiler is a program that converts another program written in a high-level language into machine code or assembly language. A compiler is described in U.S. Pat. No. 5,428,793 to Odnert et al., which is assigned to the assignee of the present invention. The compiler of Odnert et al. is designed to produce a separate summary file for each source code file that is introduced to the compiler. A program analyzer then builds a single program call graph from all of the summary files. The graph consists of a set of nodes, each representing a procedure. The nodes are interconnected by directional edges that represent calls from one procedure to another procedure. The program analyzer also identifies "webs," which link classes of definitions and uses of a variable. Thus, a web is a collection of program call graph nodes. An optimizer may then be used to increase the efficiency of the program.
Another development tool is an interpreter. The interpreter is similar to the compiler, but includes an execution step. First, the source code of a computer program of interest is converted into machine code or assembly language. A parser then forms a hierarchy that reflects the program's logic. A type checker may be used to identify programming errors. Finally, the program is executed. For example, the interpreter may identify commands to form a sequence of binary machine instructions that a computer system executes until the program is completed.
Yet another available tool is a debugger. The debugger may be used to monitor software as it is executed. Debuggers typically allow a degree of post-mortem visualization of the state of a malfunctioning program at a breakpoint. Thus, there is a limited portrayal of program execution.
A traditional method used by programmers to reduce the complexity of program design is to "encapsulate" segments of source code in blocks having one point of entry and one or more points of exit. Each block may be considered to be a black box that needs to be considered only if there is a malfunction. The black boxes then become building blocks for complex programs. Programmers may work in teams to manage the complexity of administering growing programs. That is, a complex program may be divided into functional parts in order to minimize the interdependencies among functions and to assign each function to a different individual or group of individuals. This solution is simple and elegant, but in practice it is not always viable. Moreover, minimizing interdependencies among different parts of programs may reduce complexity, but often at a sacrifice of performance. That is, there is typically a tradeoff between complexity and performance.
Program visualization may also be used to manage complexity. As previously noted with respect to the Odnert et al. patent, a software program may be viewed as a graph of interconnected nodes, typically having a hierarchical structure. Each block of code may be identified as one of the nodes of the graph. Consequently, the nodes represent methods, data accesses, and other events. Software is dynamic in nature. During run-time, a "thread" of execution traverses the graph. Each node is a potential fork for the execution thread. The description of the graph of a program is a static expression of the paths that threads take. However, the control of a path of a thread usually depends upon external events, such as data dependencies. As a result, such a graph may include a complex of thread paths, if the graphed program is sophisticated.
What is needed is a method and system for increasing the level of visualization of the internal structure of a program. What is further needed is such a method and system which provide run-time displays of operations of a computer program or programs of interest.